Skip to content

rfc: document or-slots and xor-slots in jobspec specifications - #534

Open
zekemorton wants to merge 2 commits into
flux-framework:masterfrom
zekemorton:or_slots
Open

rfc: document or-slots and xor-slots in jobspec specifications#534
zekemorton wants to merge 2 commits into
flux-framework:masterfrom
zekemorton:or_slots

Conversation

@zekemorton

Copy link
Copy Markdown

Add documentation for or-slots and xor-slots to RFC 14 and RFC 25.

RFC 14 (Canonical Jobspec)

  • Extended slot definition to describe or-slot behavior (sibling slots as alternatives)
  • Added new xor_slot reserved resource type specification
  • Added comparison table and three use cases with examples
  • Updated JSON schema to support xor_slot type

RFC 25 (Jobspec V1)

  • Added note clarifying V1 does not support or-slots or xor-slots
  • References RFC 14 for users needing alternative slot configurations

Or-slots use dynamic programming for optimal slot selection during traversal.
Xor-slots expand into distinct candidate jobspecs before traversal with first-match selection.
Both require the flexible traverser implementation.

@github-actions

Copy link
Copy Markdown

⚠️ linkcheck failed with status code 2

@zekemorton

Copy link
Copy Markdown
Author

@milroy do you mind giving this a first pass when you get a chance?

@milroy milroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far! Please add a bit more description where I indicated. After that this is good to merge as far as I'm concerned!

Comment thread spec_14.rst Outdated
Comment on lines +258 to +259
A resource type of ``type: xor_slot`` SHALL indicate an exclusive alternative
resource grouping that is expanded into distinct jobspec branches before

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to disambiguate the "exclusive" adjective here as we'll soon support non-exclusive resources in a slot. This statement should make it clear that exactly one of the XOR slots will be allocated or reserved.

Comment thread spec_14.rst
Comment on lines +261 to +262
internally, and the flexible traverser tries the expanded branches sequentially
until a match is found (first-match strategy).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to emphasize that the XOR slot order effectively encodes preference.

Comment thread spec_14.rst Outdated
Comment on lines +274 to +276
Nested ``xor_slot`` resources are supported. When processing nested xor-slots,
the expansion produces all combinations of the xor branches, and each
combination is tried as a separate candidate jobspec.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a phrase mentioning the need to limit the number of candidates, and the configuration option that sets the limit.

Zeke Chadron Blair Morton added 2 commits July 30, 2026 09:20
Add comprehensive documentation for or-slots and xor-slots to RFC 14
(Canonical Job Specification):

- Extend the slot resource type definition to explain or-slot behavior
  when multiple sibling slot resources appear at the same level
- Add new xor_slot reserved resource type with full specification
- Add comparison table contrasting or-slots vs xor-slots
- Add Section 3 with three use cases demonstrating:
  - Use Case 3.1: Or-slots for same-level alternatives
  - Use Case 3.2: Xor-slots for different hierarchy prefixes
  - Use Case 3.3: Nested xor-slots
- Update JSON schema to include xor_slot as a valid resource vertex type

Or-slots allow sibling slot resources to be evaluated as alternatives
during traversal using dynamic programming. Xor-slots expand into
distinct jobspec branches before traversal and use first-match selection.

Both features require the flexible traverser implementation.

Assisted-by: Claude <noreply@anthropic.com>
Add a note to RFC 25 (Job Specification Version 1) clarifying that
V1 jobspec does not support alternative slot configurations including
or-slots (sibling slot resources) and xor_slot resource types.

These advanced features require the flexible traverser and are only
available in the canonical jobspec format (RFC 14).

This clarification helps users understand the limitations of V1 jobspec
and directs them to RFC 14 when they need alternative slot functionality.

Assisted-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

⚠️ linkcheck failed with status code 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants